<div class="configurations form">
<h2><?php echo __('Edit Configuration'); ?></h2>
	<div class="clear"></div>
	<div class="actions selected">
		<?php 
			$domain_id = $this->Form->value('Configuration.domain_id'); if(!empty($domain_id)) echo $this->Html->link(__('Cancel'), array('controller'=>'domains','action' => 'view',$domain_id,'d'=>'settings'), array('class'=>'action-left'));
			echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $this->Form->value('Configuration.id'),'d'=>$domain_id), array('style'=>'margin-right: 25px;','class'=>'action-right'), __('Are you sure you want to delete # %s?', $this->Form->value('Configuration.id'))); 
		?>
	</div>
	<div class="clear"></div>

	
<?php echo $this->Form->create('Configuration', array('type' => 'file'));?>
	<fieldset>
	
	<?php
		echo $this->Form->input('id');
		echo $this->Form->hidden('domain_id');
		echo $this->Form->hidden('cfg_group_id',array('options'=>Configure::read('Config.cfg_groups')));
		switch($this->Form->value('Configuration.cfg_group_id')){
			case 1:
				echo $this->Form->input('name',array('readonly'=>true));
				echo $this->Form->input('value',array('after'=>__('for empty value write: null')));
				break;
			case 2:
				echo $this->Form->input('name',array('readonly'=>true));
				echo $this->Form->input('value',array('label'=>__('Url'),'after'=>__('example: http://www.google.com')));
				echo $this->Form->input('upload_id',array('empty'=>'','label'=>__('Current file name')));
				echo $this->Form->input('Upload.0.file', array('type' => 'file','label'=>__('Select new file')));
				echo $this->Form->input('Upload.description');
				break;
			case 3:
				echo $this->Form->input('name',array('readonly'=>true,'label'=>__('Social media ID')));
				echo $this->Form->input('value',array('after'=>__('number or address obtained from a social network')));
				break;
			case 4:
				echo $this->Form->input('name',array('readonly'=>true,'label'=>__('Google search engine')));
				echo $this->Form->input('value',array('after'=>__('Javascript obtained from the search engine google')));
				break;
			case 5:
				echo $this->Form->input('name',array('readonly'=>true));
				echo $this->Form->hidden('value',array('value'=>'null'));
				echo $this->Form->input('upload_id',array('empty'=>'','label'=>__('Current file name')));
				echo $this->Form->input('Upload.0.file', array('type' => 'file','label'=>__('Select new file'),'after'=>__('Background image for the category list on the home page')));
				echo $this->Form->input('Upload.description');
				break;
			case 6:
				echo $this->Form->input('name',array('readonly'=>true,'label'=>__('Global Meta tags')));
				echo $this->Form->input('value',array('after'=>h(__('Additional meta tags installed on the page, example: <meta name="Language" content="pl" />'))));
				break;
			case 7:
				echo $this->Form->input('name',array('readonly'=>true,'label'=>__('Footer text')));
				echo $this->Form->input('value',array('after'=>h(__('example: Copyright &copy by SEO Solution'))));
				break;
			case 8:
				echo $this->Form->input('name',array('readonly'=>true));
				echo $this->Form->input('value',array('after'=>__('style formating, example: background-position: center; style="background-position: center; background-color: #ffffff; background-repeat: no-repeat;')));
				echo $this->Form->input('upload_id',array('empty'=>'','label'=>__('Current file name')));
				echo $this->Form->input('Upload.0.file', array('type' => 'file','label'=>__('Select new file'),'after'=>__('image for the all pages')));
				echo $this->Form->input('Upload.description');
				break;
			case 9:
				echo $this->Form->input('name',array('readonly'=>true,'label'=>__('Footer text')));
				echo $this->Form->input('value',array('type'=>'checkbox','after'=>h(__('Display/Hide'))));
				break;
		}
	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit'));?>
</div>
<div class="actions" >
	<?php echo $this->element('/menu/main')?>
	<?php echo $this->element('/menu/settings')?>
</div>

